<template>
  <div>
    <van-swipe :autoplay="3000" lazy-render>
      <van-swipe-item v-for="image in images" :key="image">
        <img width="100%" height="200rem" :src="image" />
      </van-swipe-item>
    </van-swipe>

    <van-card class="sj1"
      v-for="item in data"
      :key="item.id"
      :desc="描述信息"
      :extra="item.extra"
      :title="item.title"
      :thumb="item.url"
    />
  </div>
</template>

<script setup>
import axios from 'axios';
import { ref } from 'vue';

const images = [
  "https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg",
  "https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg",
  "https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg",
  "https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg",
  "https://fastly.jsdelivr.net/npm/@vant/assets/apple-5.jpeg",
];
const data = ref([]);
const getdata = async () => {
  const resp = await axios.get("/api/room/list");
  console.log(resp);

  data.value = resp.data.data.list;
};

getdata();


</script>

<style lang="scss" >
*{
  margin: 0;
  padding: 0;

}

</style>